<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>List of the books</title>
</h:head>
<h:body>
	<h1>Gestion des matériels</h1>
	<hr />

	<h:form>

		<p:dataTable id="dataTable" var="it"
			value="#{materielController.materielList}" paginator="true" rows="10"
paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks}  {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			rowsPerPageTemplate="5,10,15">


			<f:facet name="header">  
            Liste des matériels 
        </f:facet>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Codes à barres" />
				</f:facet>
				<h:outputText value="#{it.codeBarres}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Prix" />
				</f:facet>
				<h:outputText value="#{it.prix}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Title" />
				</f:facet>
				<h:outputText value="#{it.libelle}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Model" />
				</f:facet>
				<h:outputText value="#{it.model}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Nature" />
				</f:facet>
				<h:outputText value="#{it.nature}" />
			</p:column>
			 <p:column>
				<f:facet name="header">
					<h:outputText value="Etat" />
				</f:facet>
				<h:outputText value="#{it.etat.type}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Fournisseur" />
				</f:facet>
				<h:outputText value="#{it.fournisseur.libelle}" />
			</p:column>
			<p:column>
				<f:facet name="header">
					<h:outputText value="Affectation" />
				</f:facet>
				<h:outputText value="#{it.affectation.toString()}" /> 
			</p:column>
		</p:dataTable>


	</h:form>



	<h:form>
		<h:commandLink action="#{materielController.doNew}">
		</h:commandLink>
	</h:form>
	<hr />
	<i>Mohssine AMHACHI - (Ecole Nationales Des Sciences Appliquées))</i>
</h:body>
</html>
